<?php
    include_once '../IcbcConstants.php';
    include_once '../UiIcbcClient.php';


    $request = array(
        "serviceUrl" => 'http://ip:port/ui/cardbussiness/zfbh5/ui/h5consumption/V2',
        "method" => 'POST',
        "isNeedEncrypt" => false,
        "biz_content" => array(
            "mer_id"=>"020001040311",
            "mer_prtcl_no"=>"0200010403110201",
            "order_id"=>"AAPPT20051202205754714",
            "decive_info"=>"9774d56d682e549c",
            "body"=>"勇士总冠军",
            "cur_type"=>"1",
            "icbc_appid"=>"10000000000004095503",
            "mer_url"=>"http://5.1fendb.com/recall/recall.php",
            "order_date_time"=>"2021-09-12T02:20:51",
            "amount"=>"1",
            "notify_type"=>"HS",
            "notify_url"=>"http://122.131.29.82",
            "result_type"=>"0",
    	    "pay_limit"=>"no_balance",
    	    "order_apd_inf"=>"test",
    	    "detail"=>"",
    	    "attach"=>"attach",
      	    "ser_id"=>"ser_id",
      	    "is_suborder"=>"1",
      	    "order_num"=>"1",
            "order_submit_act_input"=>
                array(
                "seq_no"=>"020001030604000521912200000001",
                "mer_sp_infor"=>"商户自定义信息",
                "sub_mer_prtcl_no"=>"0200010305560201",
                "ori_trx_date"=>"2021-10-11",
                "classify_amt"=>"1",
                "term_id"=>"1",
                "busi_type"=>"2",
                "sub_order_no"=>"55555",
                "rec_num"=>"1",
                "mer_acct"=>"0200000209024213154",
                "ori_mer_id"=>"20001030604",
                "oper_flag"=>"0",
                "sub_mer_id"=>"020001030556"
                )
    
        )

    );

    $client = new UiIcbcClient('10000000000004095503',
        'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDYLo0htdHwedbvoJA0o5AA/UUE1zb/J4OO9SYmeMBZnLeiNC7TwG53PXgwCSHsp2gM02QatfohUUDHQJg/ezYCSDSMoWfYKv/dfz0DlXp1C8xOnc/im2y0PnZV1YVaTsFHnax91N7nxtfsGVRlT8e2UdkWlW0HX2QOxCBpuevDssfosA151f4JV07VHl+pyHxTS48wGeqDUU0z+hvD8P+KIA01/UO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zfxoR+ywg8GKK8Fq3dmigkB4hL+YjyBnxX0SouyLoWUZ0Jvsurr9bZ5h/qvPyLhtCQyc7QXM4fBKlOy0rxgOBIxRWKMVvJeFHEqw6SBAoGAPuR/+v2VCePORhobY0EIIRLK1sO+Q2IVJIU4ecm0irD99/uwEc+RgJF0IakYlrw1PtmhDYniXO07GMIecj4zsnnPZtkttoNxmikMrK51YsFcsz8I55XzRPPGj1V8CxpfRxmEj9ofyHYHDDvSoHAR28xJdubbn3PuB7nBp94yNWk=',
        IcbcConstants::$SIGN_TYPE_RSA,
        '',
        '',
        '',
        '',
        '',
        '',
        '');

    try{
        $resp = $client->buildPostForm($request,'12314adafadsa',''); //执行调用
        echo $resp;
    }catch(Exception $e){//捕获异常
        echo 'Exception:'.$e->getMessage()."\n";
    }

?>